package com.mypackage.LocationPattern;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TimePicker;
import android.widget.Toast;

public class TimePickerHandler extends Activity {
	
	TimePicker timePicker;
    int hour, minute;
    static final int TIME_DIALOG_ID = 0;
    private Button mPickTime;

    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.timescreen);
    
        // capture our View elements
       
        
        timePicker = (TimePicker) findViewById((Integer) R.id.timePicker);
        timePicker.setIs24HourView(true);
//        
//       

        // add a click listener to the button
        mPickTime = (Button) findViewById(R.id.pickTime);
        mPickTime.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
            	Toast.makeText(getBaseContext(), "Time Selected: "+ "Current Hour: " + timePicker.getCurrentHour() + 
            			"Current minute: " + timePicker.getCurrentMinute(), Toast.LENGTH_SHORT).show();
                //showDialog(DATE_DIALOG_ID);
            }
        });

        

        
    }
}
